#ifndef MTS_MANAGER_H
#define MTS_MANAGER_H

#include <QtGui/QWidget>
#include <QtGui/QPainter>
#include <QtGui/QBitmap>
#include <QtGui/QRegion>
#include <QTimer>
#include "ui_mts_manager.h"
#include "QListWidgetItemSpec.h"
#include "qenterpin.h"
#include "checkupdates.h"

class mts_manager : public QWidget
{
    Q_OBJECT

public:
    mts_manager(QWidget *parent = 0);
    ~mts_manager();

    void paintEvent(QPaintEvent * event );
    void fillSettingsList();

    QEnterPIN * wndEnterPIN;
    CheckUpdates * wndCheckUpdates;

    bool isConnected(){ return isConnected_; };
    void setConnected( bool connectedState){ isConnected_ = connectedState; };

    QTimer * timerApp;

    bool mousePressed;
    bool mouseMoved;
    bool mouseReleased;

public slots:
    void OnMainCheckBalance();
    void OnMainActivateUpdates();
    void OnMainActivatePayCard();
    void OnMainCheckUpdates();
    void OnMainConnect();
    void OnUpdateSoft1();
    void OnSettings();
    void OnCalls();
    void OnConnect();
    void OnSMS();
    void OnSettingsItemChanged(QListWidgetItem *current, QListWidgetItem *previous);
    void OnContactClicked(QListWidgetItem*);
    void OnEditPIN();
    void OnEnterPUK();
    void OnAbout_UpdateProgram();

    void OnSMSItemClicked(QTreeWidgetItem*,int);


    void On100Mb();
    void On250Mb();
    void On500Mb();
    void On1Gb();
    void OnStatsTransparencyChanged(int value);

    void CloseWnd();

    void OnAddContact();

    QTreeWidget * getLeftTree();

    void mousePressEvent( QMouseEvent * event);
    void mouseMoveEvent( QMouseEvent * event);
    void mouseReleaseEvent( QMouseEvent * event);
    void dragMoveEvent( QDragMoveEvent* event );


private:
    Ui::mts_managerClass ui;
    QListWidgetItemSpec * lwItemStartupParams;
    QListWidgetItemSpec * lwItemInterfaceSettings;
    QListWidgetItemSpec * lwItemModemSettings;
    QListWidgetItemSpec * lwItemNet;
    QListWidgetItemSpec * lwItemPIN;
    QListWidgetItemSpec * lwItemSMS;
    QListWidgetItemSpec * lwItemRecordBook;
    QListWidgetItemSpec * lwItemVoiceCalls;
    QListWidgetItemSpec * lwItemAbout;



    bool isConnected_;
};



#endif // MTS_MANAGER_H
